<%@page import="com.qdu.dao.Recommend"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="java.util.List"%>
<%@page import="java.*"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!-- import="java.util.*,impl.*,java.text.* " -->
<!DOCTYPE HTML>
<HTML>
    <HEaD>
        <TITLE>网上书店</TITLE>

        <STYLE>
            #div0{
                width:100%;
                height:50px;
                background-color:#FFCCCC;
                position:fixed;
                z-index:10;
                margin:-10px -10px 0px -10px;
            }
            #top-page{
                float:right;
                height:10px;
                white-space:nowrap;
                margin:25px 0px 0px 0px;

            }	
            #logo{
                height:50px;
                width:50px;
                float:left;
            }

        </style>
    <BODY leftMargin=0 topMargin=0 style="background-color:#F0FFFF">


        <div id="div0">
            <div id="logo">
                <img src="img/logo.jpg" style="width:100%;height:100%; margin-left:15%">
            </div>
            <div id="top-page" align="right" style="margin-right:5%">
                <div align=center>
                    <a href="/J02_T13_P04/index.jsp"><FONT color=#ffffff>首页</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/newbook.jsp"><FONT color=#ffffff>最新图书</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/fenlei.jsp"><FONT color=#ffffff>图书分类</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/allbooklist.jsp"><FONT color=#ffffff>全部图书</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/admin/login.jsp" target=_blank><FONT color=#ffffff>管理入口</FONT></a>
                </div>
            </div>
        </div>
        <div align="center">
            <img src="img/top.jpg"  style="margin-top:50px;" width="779" >
        </div>
        <TABLE cellSpacing=0 cellPadding=0 width=779 align=center 
               border=0>

            <TBODY>
                <TR>
                    <TD vAlign=top width=779>

                        <table cellspacing=0 cellpadding=3 width="100%" border=0>
                            <tbody>
                                <tr>
                                <tr>
                                    <td width="85%">
                                        <table cellspacing=0 cellpadding=2 width="100%" 
                                               border=0>
                                            <tbody>

                                                <%
                                                    String type = request.getParameter("type");
                                                    List list = new Recommend().getTypeBooklist(type);
                                                    NumberFormat format = NumberFormat.getNumberInstance();
                                                    format.setMaximumFractionDigits(2);
                                                    for (int i = 0; i < list.size(); i++) {
                                                        List list2 = (List) list.get(i);

                                                %>
                                                <tr>
                                                    <td width="100%">	  
                                                        <table  align=center  cellspacing=0 cellpadding=2 width="100%" border=0>
                                                            <tbody>                         
                                                                <tr>
                                                                    <td width=14% align=center ><a href="admin/bookinfo.jsp?id=<%=list2.get(3).toString()%>" target=_blank><font color=#ff6600><%=list2.get(0).toString()%></font></a></td>                          
                                                                    <td  width=14%   align=center >定价：<%=list2.get(2).toString()%>￥</td>                          
                                                                    <td  width=14%   align=center >白金价：<font color=#ff0000><%=format.format(Float.parseFloat(list2.get(2).toString()) * 0.8)%>￥</font></td>                           
                                                                    <td  width=14%   align=center >黄金价：<font color=#ff0000><%=format.format(Float.parseFloat(list2.get(2).toString()) * 0.7)%>￥</font></td>
                                                                    <td  width=14%   align=center ><%=list2.get(4).toString()%></font></td>
                                                                    <td  width=14%   align=center ><%=list2.get(5).toString()%></font></td>
                                                                    <td  width=14%   align=center ><%=list2.get(6).toString()%></font></td>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </td>
                                                </tr>
                                                <%
                                                    }
                                                %>

                                            </tbody>
                                        </table>
                                    </TD>


                                </TR></TBODY></TABLE>
                        <br><br><br>
            <br><br><br></table>
        <div style="background:#CCFFFF;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
        <div style="background:#FFCCCC;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
        <div style="background:#CCFFFF;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
    </BODY></HTML>
